class CreateCategories < ActiveRecord::Migration
  def self.up
    create_table :categories do |t|
      t.column :name,         :string,    :null => false
      t.column :description,  :text
      t.column :person_id,    :integer,   :null => false
      t.column :created_at,   :datetime,  :null => false
      t.column :updated_at,   :datetime,  :null => false
      t.column :lock_version, :integer,   :null => false, :default => 0
    end
  end

  def self.down
    drop_table :categories
  end
end
